<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>IPA</el-breadcrumb-item>
      <el-breadcrumb-item>APP列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card">
      <div slot="header" class="clearfix">

        <span>关联App列表</span>
        <el-select v-model="value" placeholder="请选择App版本">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>

        <el-button style="float: right; padding: 3px 0" type="text" @click="addApp">添加</el-button>
      </div>
      <el-table
        :data="tableData"
        style="width: 100%" @cell-click="appDetails">
        <el-table-column
          prop="appIcon"
          label="图标"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="名称"
        >
        </el-table-column>
        <el-table-column
          prop="appid"
          label="appid">
        </el-table-column>
        <el-table-column
          prop="details"
          label="点击进入详情">
        </el-table-column>
      </el-table>
    </el-card>

  </div>
</template>

<script>
  export default {
    name: "AppTabulation",
    data() {
      return {
        options: [{
          value: '选项1',
          label: 'app1'
        }, {
          value: '选项2',
          label: 'app2'
        }, {
          value: '选项3',
          label: 'app3'
        }, {
          value: '选项4',
          label: 'app4'
        }, {
          value: '选项5',
          label: 'app5'
        }],
        value: '',
        tableData: [{
          name: '项目1',
          appIcon: '12345',
          appid: '1111111',
          details: '详情'
        }, {
          name: '项目2',
          appIcon: '12345',
          appid: '1111111',
          details: '详情'
        }, {
          name: '项目3',
          appIcon: '12345',
          appid: '1111111',
          details: '详情'
        }],
      }

    },
    methods: {
      addApp() {
        this.$router.push("/addApp")
      },
      appDetails() {
        this.$router.push("/appListDetails")
      }
    }

  }
</script>

<style scoped>
  .el-card {
    margin-top: 20px;

  }
</style>
